import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false

// 引入图片懒加载模块
import VueLazyLoad from 'vue-lazyload'
Vue.use(VueLazyLoad,{
    loading: require("@/assets/placeholder.gif")
})

// 导入组件库 element-ui
// import ElementUI from 'element-ui';
// import 'element-ui/lib/theme-chalk/index.css';
// Vue.use(ElementUI);

// 按需导入组件库 element-ui
import {
  Input,
  Backtop,
  Carousel,
  CarouselItem,
  Button,
  Message,
  MessageBox,
  Rate,
  Checkbox,
  CheckboxGroup
} from 'element-ui';
Vue.use(Input);
Vue.use(Backtop);
Vue.use(Carousel);
Vue.use(Button);
Vue.use(CarouselItem);
Vue.use(Rate);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.prototype.$message = Message;
Vue.prototype.$confirm = MessageBox.confirm;


// 初始化Vuex状态管理中的登录状态
store.state.token = sessionStorage.getItem("token")
// store.commit()



new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
